package com.it.you.base.trytest;

public class TryTest1 {

    public static void main(String[] args) {
        try {
            String youhui = getStr("youhui");
            System.out.println(youhui);
            System.out.println("=======");
            return;
        } catch (Exception e) {
            //程序出现异常会执行catch中的断码
            System.out.println(e.getMessage());
            Integer a = 4;
            int b = 4;
            System.out.println(a.equals(b));
        }finally {
            //这里的代码肯定会执行
            System.out.println("finally");
            return;
        }
    }

    public static String getStr(String str){
        int a = 1/0 ;
        return str;
    }
}
